package com.hdl.servlet.address;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

import com.hdl.R;
import com.hdl.entity.Areas;
import com.hdl.service.AreasService;
import com.hdl.service.impl.AreasServiceImpl;
import com.hdl.servlet.HttpServletSupport;

/**
 * <pre>
 * -JSON控制器
 * - 行政区域
 * ClassName : com.hdl.servlet.address.AreasServlet
 * @author 湛锋
 * Date : 2020-8-24 11:15:46
 * </pre>
 */
@SuppressWarnings("serial")
@WebServlet("/areas.let")
public class AreasServlet extends HttpServletSupport {
	
	private AreasService areasService = new AreasServiceImpl();
	
	public Object execute(Areas areas)throws Exception {
		return areasService.listChildren(areas.getPid());
	}
	
	public Object get(Areas areas)throws Exception {
		return areasService.get(areas.getId());
	}
	
	public Object list(Areas areas)throws Exception {
		return areasService.list(areas.getId());
	}
	
	public Object name(Areas areas)throws Exception {
		return areasService.getName(areas.getId());
	}
	
	
}